View Single Post
Old 10-31-2009, 11:08 AM   #88
ericshliao
Guru
ericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enough
 
Posts: 976
Karma: 687
Join Date: Nov 2007
Device: Dell X51v; iLiad v2
Another question:
I have a line of C code "PangoMatrix matrix = PANGO_MATRIX_INIT;" (http://library.gnome.org/devel/pango...h-Storage.html) and I want to convert it to Lua. The line will create a struct consisting 6 double variables.

I tried with "p_matrix = pango.PANGO_MATRIX_INIT". Lua interpretor did accept the form, but in fact p_matrix is still "nil". How do I solve the problem?

Added:
There seems a convenient utility: toLua (http://www.tecgraf.puc-rio.br/~celes/tolua/). But I can't build it on my Linux desktop.

Added 2:
I can build toLua now, but it seems not what I want.

Added 3:
Problem solved. The correct form is "p_matrix = pango.Matrix.INIT".

Added 4:
I am wrong. "p_matrix = pango.Matrix.INIT" is not correct.

Last edited by ericshliao; 10-31-2009 at 01:17 PM.
ericshliao is offline   Reply With Quote