Re: Gtk 1.162 build issues under win32




On Dec 29, 2007, at 6:22 AM, T.J. Ferraro wrote:

Using VC7.

My condolences.  I have no access to this, so i can only offer hints....


Dumb idea? I don't know the code...I just know it compiled :) Thanks for
any thoughts on the matter.


That sounds an awful lot like one of the macros is evaluating in a a way that is incompatible with your perl's build flags. Both gGPERL_CALLBACK_MARSHAL_SP and GPERL_CALLBACK_MARSHAL_INIT() change their definitions based on PERL_IMPLICIT_CONTEXT, and the series of "too few arguments" errors sounds a lot like the definitions of things like newSVsv() are also not getting the implicit context pointers they expect.

I don't really understand why changing where the callback argument is declared would affect that, unless one of the macros has a statement at the end. Try changing the code to this:

    static void
    gtk2perl_pango_cairo_shape_renderer_func (cairo_t *cr,
                                              PangoAttrShape * attr,
                                              gboolean do_path,
                                              gpointer data)
    {
GPerlCallback * callback = data; /* Do this first in case the next macro ends with a statement */
        dGPERL_CALLBACK_MARSHAL_SP;

        GPERL_CALLBACK_MARSHAL_INIT (callback);
    ....


This should give the same effect as what you did with changing the argument's type, but will not require casting the function pointer at its points of use, and will verify the theory that something about the expansion of dGPERL_CALLBACK_MARSHAL_SP is amiss.


--
The one difference between Dali and a crazy man is very simple: Dali is not crazy at all.
  -- Salvador Dali





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]