BUILD_RPC always defined

classic Classic list List threaded Threaded
3 messages Options
Martin Guy Martin Guy
Reply | Threaded
Open this post in threaded view
|

BUILD_RPC always defined

Bogdan,
  In all the platform_conf.h files there is the following paragraph:

#if defined( BUILD_RPC ) || defined( ELUA_BOOT_RPC )
#define RPCLINE _ROM( AUXLIB_RPC, luaopen_rpc, rpc_map )
#else
#define RPCLINE
#if !defined( BUILD_RPC )
#define BUILD_RPC
#endif
#endif

which means that. if BUILD_RPC is not defined, it get defined anyway
in the #else clause.
It doesn't provoke any errors or code bloat for avr32 (since the
linker garbage-collects the RPC functions that are compiled but not
referenced). I only noticed it because, having disabled dump/undump,
the RPC module gave warnings about undump not being declared.

Is there any reason to always define BUILD_RPC, even when it is not required?

   M
_______________________________________________
eLua-dev mailing list
[hidden email]
https://lists.berlios.de/mailman/listinfo/elua-dev
BogdanM BogdanM
Reply | Threaded
Open this post in threaded view
|

Re: BUILD_RPC always defined

On Thu, Dec 2, 2010 at 11:41 AM, Martin Guy <[hidden email]> wrote:

> Bogdan,
>  In all the platform_conf.h files there is the following paragraph:
>
> #if defined( BUILD_RPC ) || defined( ELUA_BOOT_RPC )
> #define RPCLINE _ROM( AUXLIB_RPC, luaopen_rpc, rpc_map )
> #else // #if defined( BUILD_RPC ) || defined( ELUA_BOOT_RPC )
> #define RPCLINE
> #if !defined( BUILD_RPC )
> #define BUILD_RPC
> #endif
> #endif
>
> which means that. if BUILD_RPC is not defined, it get defined anyway
> in the #else clause.
> It doesn't provoke any errors or code bloat for avr32 (since the
> linker garbage-collects the RPC functions that are compiled but not
> referenced). I only noticed it because, having disabled dump/undump,
> the RPC module gave warnings about undump not being declared.
>
> Is there any reason to always define BUILD_RPC, even when it is not required?

Thanks for reminding me about this, I saw it too at some point but
forgot about it. James, the ball is in your court :)

Best,
Bogdan
_______________________________________________
eLua-dev mailing list
[hidden email]
https://lists.berlios.de/mailman/listinfo/elua-dev
jbsnyder jbsnyder
Reply | Threaded
Open this post in threaded view
|

Re: BUILD_RPC always defined

I see my grand plan to make sure every build contains LuaRPC has been foiled ;-)

I'll commit a fix for this later today.  BUILD_RPC shouldn't be
necessary in all cases.  I think what should have been there was if
ELUA_BOOT_RPC was defined and BUILD_RPC was not, BUILD_RPC would be
turned on automatically.  That said, I will do some investigation
before simply applying that correction.  If you can't wait for that
feel free to experiment with removing that block for now if you
definitely don't want LuaRPC.

Thanks for the heads-up :-)

On Thu, Dec 2, 2010 at 9:44 AM, Bogdan Marinescu
<[hidden email]> wrote:

> On Thu, Dec 2, 2010 at 11:41 AM, Martin Guy <[hidden email]> wrote:
>> Bogdan,
>>  In all the platform_conf.h files there is the following paragraph:
>>
>> #if defined( BUILD_RPC ) || defined( ELUA_BOOT_RPC )
>> #define RPCLINE _ROM( AUXLIB_RPC, luaopen_rpc, rpc_map )
>> #else // #if defined( BUILD_RPC ) || defined( ELUA_BOOT_RPC )
>> #define RPCLINE
>> #if !defined( BUILD_RPC )
>> #define BUILD_RPC
>> #endif
>> #endif
>>
>> which means that. if BUILD_RPC is not defined, it get defined anyway
>> in the #else clause.
>> It doesn't provoke any errors or code bloat for avr32 (since the
>> linker garbage-collects the RPC functions that are compiled but not
>> referenced). I only noticed it because, having disabled dump/undump,
>> the RPC module gave warnings about undump not being declared.
>>
>> Is there any reason to always define BUILD_RPC, even when it is not required?
>
> Thanks for reminding me about this, I saw it too at some point but
> forgot about it. James, the ball is in your court :)
>
> Best,
> Bogdan
> _______________________________________________
> eLua-dev mailing list
> [hidden email]
> https://lists.berlios.de/mailman/listinfo/elua-dev
>



--
James Snyder
Biomedical Engineering
Northwestern University
[hidden email]
PGP: http://fanplastic.org/key.txt
Phone: (847) 448-0386
_______________________________________________
eLua-dev mailing list
[hidden email]
https://lists.berlios.de/mailman/listinfo/elua-dev