|
Rockbox mail archiveSubject: Re: Plugin API requestsRe: Plugin API requests
From: Daniel Stenberg <daniel_at_haxx.se>
Date: Fri, 4 Jul 2003 17:27:39 +0200 (CEST) On Thu, 3 Jul 2003, Garrett Derner wrote: > Come to think of it, what I was suggesting (making _ctype[]_ available > through the plugin API) would not work. Because then the array would not be > called _ctype_[]. It would be rb->_ctype_[], or > my_plugin_api_ptr->_ctype_[], whatever. The isspace() macro and the other ones would then possibly be changed to look like that. I've already before been thinking about having ALL functions in the plugin API redefined similar to: #ifdef PLUGIN #define strlen(x) rb->strlen(x) #else /* strlen() is used like normal */ #endif ... this would give several benefits: 1. You can move code from "plain" rockbox to a plugin without changing it. 2. You can select to build stuff as plugin OR as plain code. This would be very useful in the simulator, as debugging is a lot easier without plugins. 3. It takes less documenting and getting-used-to by programmers. The downsides: 1. It redefines and hides what is actually done. When I get back from my vacation, I'll see if this is doable/sensible. -- Daniel Stenberg -- http://rockbox.haxx.se/ -- http://daniel.haxx.se/Received on 2003-07-04 Page template was last modified "Tue Sep 7 00:00:02 2021" The Rockbox Crew -- Privacy Policy |