Defining array constant

Y

yue_nicholas

Hi,

I need to define two constant of array type, what is the recommended
way to do that?

rb_define_const(module, "MASK", ...mask value...is float[4][4]);
rb_define_const(module, "LIGHTTINT", ...color value...is float[3]);

I have seen example for string and integer but not for arrays.

Cheers
 
L

Logan Capaldo

Hi,

I need to define two constant of array type, what is the recommended
way to do that?

rb_define_const(module, "MASK", ...mask value...is float[4][4]);
rb_define_const(module, "LIGHTTINT", ...color value...is float[3]);

I have seen example for string and integer but not for arrays.

Cheers

Look at README.EXT. Specifically rb_ary_new and friends.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,763
Messages
2,569,562
Members
45,039
Latest member
CasimiraVa

Latest Threads

Top