Rockbox.org home
release
dev builds
extras
themes manual
wiki
device status forums
mailing lists
IRC bugs
patches
dev guide
translations



Rockbox mail archive

Subject: Re: char[] assignment in plugin api

Re: char[] assignment in plugin api

From: Björn Stenberg <bjorn_at_haxx.se>
Date: Tue, 6 Jan 2004 15:43:53 +0100

phil_at_carangg.de wrote:
> Funny. When you program a plugin you cannot initialize a string with
>
> char mystring[] = "mystring";
>
> because inernally it seems to use memcpy. But that function is only
> available via the api pointer. Is that fixable / worth fixing?

The preferred way to use a hardcoded string is:

  char* mystring = "mystring";

This will not need mempcy(). It has the additional benefit of saving some ram.

-- 
Björn
Received on 2004-01-06

Page template was last modified "Tue Sep 7 00:00:02 2021" The Rockbox Crew -- Privacy Policy