Perl

NAVIGATION
CATEGORIES
REFERRENCE
LINKS
  • hbb-DPERL_GLOBAL_STRUCT_PRIVATE tweaks (done_sanity_check global? yech!)

    5 answers - 1345 bytes - related search similar search Add To My Delicious Add To My Stumble Upon Add To My Google Mark Add To My Facebook Add To My Digg Add To My Reddit

    hv.c.dist2006-07-14 08:42:56.000000000 +0300
    hv.c2006-07-14 08:43:37.000000000 +0300
    @@ -2577,6 +2577,7 @@
    SV *
    S_refcounted_he_value(pTHX_ const struct refcounted_he *he)
    {
    + dVAR;
    SV *value;
    switch(he->refcounted_he_data[0] & HVrhek_typemask) {
    case HVrhek_undef:
    @@ -2728,6 +2729,7 @@
    Perl_refcounted_he_fetch(pTHX_ const struct refcounted_he *chain, SV *keysv,
    const char *key, STRLEN klen, int flags, U32 hash)
    {
    + dVAR;
    /* Just to be awkward, if you're using this interface the UTF-8-or-not-ness
    of your key has to exactly match that which is stored. */
    SV *value = &PL_sv_placeholder;
    sv.c.dist2006-07-14 08:48:14.000000000 +0300
    sv.c2006-07-14 09:04:17.000000000 +0300
    @@ -1032,7 +1032,7 @@
    #define new_NARENAZ(details) \
    my_safecalloc((details)->body_size + (details)->offset)
    -#ifdef DEBUGGING
    +#if defined(DEBUGGING) && !defined(PERL_GLBAL_STRUCT_PRIVATE)
    static bool done_sanity_check;
    #endif
    @@ -1048,7 +1048,9 @@
    assert(bdp->arena_size);
    -#ifdef DEBUGGING
    +#if defined(DEBUGGING) && !defined(PERL_GLBAL_STRUCT_PRIVATE)
    + /* PERL_GLBAL_STRUCT_PRIVATE cannot coexist with global
    + * variables like done_sanity_check. */
    if (!done_sanity_check) {
    unsigned int i = SVt_LAST;
  • No.1 | | 1461 bytes | |

    Fri, 14 Jul 2006 09:34:09 +0300 (EEST), Jarkko Hietaniemi <jhi (AT) cc (DOT) hut.fi>
    wrote:

    Thanks, applied as change #28570

    hv.c.dist2006-07-14 08:42:56.000000000 +0300
    hv.c2006-07-14 08:43:37.000000000 +0300
    @@ -2577,6 +2577,7 @@
    SV *
    S_refcounted_he_value(pTHX_ const struct refcounted_he *he)
    {
    + dVAR;
    SV *value;
    switch(he->refcounted_he_data[0] & HVrhek_typemask) {
    case HVrhek_undef:
    @@ -2728,6 +2729,7 @@
    Perl_refcounted_he_fetch(pTHX_ const struct refcounted_he *chain, SV *keysv,
    const char *key, STRLEN klen, int flags, U32 hash)
    {
    + dVAR;
    /* Just to be awkward, if you're using this interface the UTF-8-or-not-ness
    of your key has to exactly match that which is stored. */
    SV *value = &PL_sv_placeholder;
    sv.c.dist2006-07-14 08:48:14.000000000 +0300
    sv.c2006-07-14 09:04:17.000000000 +0300
    @@ -1032,7 +1032,7 @@
    #define new_NARENAZ(details) \
    my_safecalloc((details)->body_size + (details)->offset)
    -#ifdef DEBUGGING
    +#if defined(DEBUGGING) && !defined(PERL_GLBAL_STRUCT_PRIVATE)
    static bool done_sanity_check;
    #endif

    @@ -1048,7 +1048,9 @@

    assert(bdp->arena_size);
    -#ifdef DEBUGGING
    +#if defined(DEBUGGING) && !defined(PERL_GLBAL_STRUCT_PRIVATE)
    + /* PERL_GLBAL_STRUCT_PRIVATE cannot coexist with global
    + * variables like done_sanity_check. */
    if (!done_sanity_check) {
    unsigned int i = SVt_LAST;
  • No.2 | | 614 bytes | |

    Fri, Jul 14, 2006 at 09:34:09AM +0300, Jarkko Hietaniemi wrote:
    hv.c.dist2006-07-14 08:42:56.000000000 +0300
    hv.c2006-07-14 08:43:37.000000000 +0300
    @@ -2577,6 +2577,7 @@
    SV *
    S_refcounted_he_value(pTHX_ const struct refcounted_he *he)
    {
    + dVAR;
    -#ifdef DEBUGGING
    +#if defined(DEBUGGING) && !defined(PERL_GLBAL_STRUCT_PRIVATE)

    I assume that it would be possible to smoke with the global struct private.
    Is it as simple as ? I don't spot
    anything in INSTALL about it, which is where I thought these sort of
    instructions usually went.

    Nicholas Clark
  • No.3 | | 551 bytes | |

    Mon, Jul 17, 2006 at 08:42:55AM +0300, Jarkko Hietaniemi wrote:
    Nicholas Clark wrote:

    if anyone has requested this of the SWIG maintainers.

    It's rather yucky that they diddle with our globals, we aren't
    *that* familiar, I think.

    No, it's their code for created new custom vtables. So it doesn't diddle.

    [And I'm guilty of not reporting a bug in it. I believe that it leaks vtables,
    because it allocates them via malloc() and nothing will ever free() them]

    Nicholas Clark
  • No.4 | | 999 bytes | |

    Mon, Jul 17, 2006 at 08:33:00AM +0300, Jarkko Hietaniemi wrote:

    There are at least two problems: (1) the magic vtables are not const,
    even though they must have been at some point because otherwise there
    would have been no Symbian port. (2) I just recently realized that the

    SWIG is making the assumption that it can modify the vtable via the pointer.
    Hence Rafael backed that out. Probably SWIG should change, but I'm not sure
    if anyone has requested this of the SWIG maintainers.

    introduction of DynaLoader.o to libperl is something quite unexpected
    by the Symbian Perl build framework. And since I no more have neither
    access nor time to keep the Symbian port alive and kicking, the port is
    currently somewhat dead. Maybe I need to lure someone to continue the
    work.

    I'm not sure how that addition pans out on Unix platforms, where one has an
    existing perl installation with a shared perl library.

    Nicholas Clark
  • No.5 | | 910 bytes | |

    Nicholas Clark wrote:
    Mon, Jul 17, 2006 at 08:33:00AM +0300, Jarkko Hietaniemi wrote:

    >There are at least two problems: (1) the magic vtables are not const,
    >even though they must have been at some point because otherwise there
    >would have been no Symbian port. (2) I just recently realized that the


    SWIG is making the assumption that it can modify the vtable via the pointer.
    Hence Rafael backed that out. Probably SWIG should change, but I'm not sure

    Well, I can probably make that spot conditional on
    PERL_GLBAL_STRUCT_PRIVATE, nobody else than Symbian is currently
    doing that, and the changes of SWIG being used on Symbian are pretty
    darn low.

    if anyone has requested this of the SWIG maintainers.

    It's rather yucky that they diddle with our globals, we aren't
    *that* familiar, I think.

Re: hbb-DPERL_GLOBAL_STRUCT_PRIVATE tweaks (done_sanity_check global? yech!)


max 4000 letters.
Your nickname that display:
In order to stop the spam: 9 + 8 =
QUESTION ON "Perl"

EMSDN.COM