[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4762: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3897)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4764: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3897)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4765: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3897)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4766: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3897)
newlispfanclub.alh.net • View topic - Does struct support only up to 32 parameters?

Does struct support only up to 32 parameters?

Q&A's, tips, howto's

Does struct support only up to 32 parameters?

Postby psilwen » Mon Aug 21, 2017 6:33 pm

(reverse "newlisp")
psilwen
 
Posts: 21
Joined: Thu Jul 03, 2014 5:25 am

Re: Does struct support only up to 32 parameters?

Postby Lutz » Mon Aug 21, 2017 8:02 pm

Lutz
 
Posts: 5279
Joined: Thu Sep 26, 2002 4:45 pm
Location: Pasadena, California

Re: Does struct support only up to 32 parameters?

Postby psilwen » Wed Aug 23, 2017 4:18 am

(reverse "newlisp")
psilwen
 
Posts: 21
Joined: Thu Jul 03, 2014 5:25 am

Re: Does struct support only up to 32 parameters?

Postby Lutz » Wed Aug 23, 2017 2:54 pm

As you have seen, one can use ‘pack’ and ‘unpack’ alone to access data in a structure. You just need to have good C-language knowledge and know where filler/alignment bytes have to be inserted and be familiar with address arithmetic and usage in C. E.g. arrays in C are simply pointers to memory where the members are packed one after each other.

With ‘struct’ most of this work is done by libffi. Perhaps it is this library which introduces the 32-limit.
Lutz
 
Posts: 5279
Joined: Thu Sep 26, 2002 4:45 pm
Location: Pasadena, California


Return to newLISP in the real world

Who is online

Users browsing this forum: No registered users and 2 guests

cron