Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:116542 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 80181 invoked from network); 28 Nov 2021 20:24:55 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 28 Nov 2021 20:24:55 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 7F774180507 for ; Sun, 28 Nov 2021 13:22:57 -0800 (PST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=0.6 required=5.0 tests=BAYES_50,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,HTML_MESSAGE, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.2 X-Spam-ASN: AS15169 209.85.128.0/17 X-Spam-Virus: No X-Envelope-From: Received: from mail-lj1-f179.google.com (mail-lj1-f179.google.com [209.85.208.179]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Sun, 28 Nov 2021 13:22:57 -0800 (PST) Received: by mail-lj1-f179.google.com with SMTP id 207so30575083ljf.10 for ; Sun, 28 Nov 2021 13:22:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:from:date:message-id:subject:to; bh=ZRk0wYHPPHOlJyOgti+YojTpWqJJ06treOcDE1U+l44=; b=cH+8m9Q7fC91IOg/InP9GnTs1bdRo/Tjh56eUNxIQb0RRWboB04Mqk+TyDZaEFRZgL PxBmIyfCy0caDBxP8EU517Ny3IaC5+rzkdnlQFsCVKHvV0tRiJRmB9z8/SwI657PyvWs FxTkp6+GPdiXFUeKjDn895fwrzrsYBt7EMobbrzGjfqa8Y2M7gZDmAWj28pECqXmsa3n D1Y2JzSeUKb5j1s3VUq2sOVhd7lEWwZjTTTzxSWUINl1VjtkRdxm2CUDl10oE/lZT1Wp kJCAuRO+eqngSjxRc4HmzhSXDuVcSso+ZCJKVoM4GEaYG1pOqmFznVmo/nSwesm7VJvW rfkg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=ZRk0wYHPPHOlJyOgti+YojTpWqJJ06treOcDE1U+l44=; b=xnNhEGzU2Zsh5PqGWe6XL/C8/mmS1Exwb3lss9LyAcYH8SjQNTAnc1BbgVIPzQo1SK nUa6GXRb14vud7DSHJpH6YCHEeVNeKVb136sPBZL7Kl1HlEJCDrrJflnFTANaT661Gr7 HR391c8OKh+Td0moQhGw4w1yiUn5MvXwA62ReoZh4Ci2ij0XFID2pkA7HTeesWnSsBOZ DOOfPgY88NpLfyYTrkfsbBcKf1y8J++uDXAo/7U7EzbjMkZaGlgt07q2qbKK5zLpNpVA eaxP6sRPjwO4/qJm18qZOSOrvAR4fzfsCnQki6Q5CLKg3P9eu0q4Xfgi2IajKh57z4xk n58g== X-Gm-Message-State: AOAM531/HeX6wGq/SJKbjnFznZtBcIoHZBj+c211yiCwdV3FpnzDDi0c 7gHm8nOU09pHKF4xnqBpDUSb2hdO63jzlWb5gaupXwoD2qk= X-Google-Smtp-Source: ABdhPJxmnpXzQixmtAy2IgRIjEqQz8Rv++jLUi9Gr4KZYQXNMu44Pfmjn/mxZTQ8WGs5OG7WNXkxJLWmIAM8FMQzQCw= X-Received: by 2002:a2e:a7cb:: with SMTP id x11mr46037809ljp.308.1638134575151; Sun, 28 Nov 2021 13:22:55 -0800 (PST) MIME-Version: 1.0 Date: Sun, 28 Nov 2021 22:22:44 +0100 Message-ID: To: PHP internals Content-Type: multipart/alternative; boundary="000000000000723ea905d1dfedf6" Subject: Cache zend_function* From: glash.gnome@gmail.com (Glash Gnome) --000000000000723ea905d1dfedf6 Content-Type: text/plain; charset="UTF-8" Hello internals, I'm doing the Cairo C API extension. Also there is a wrapper written in php for the OOP side( example: https://github.com/gtkphp/gtkphp/blob/main/lib/Cairo/Context.php) So far, so good. Now let's do the same thing with Gtk, (https://github.com/gtkphp/gtkphp/blob/main/lib/Gtk/Widget.php#L7) Luckily I can *store zend_function* pointer in the GtkWidgetClass*( C-like OOP) Finally, I do the same thing for GHashTable( C API + php OOP) But now I need to *use a global zend_array/hash to store the overridden methods* for the same reasons as https://github.com/php/php-src/pull/7695 I think it is better( more generic, simple to understand) to *overload the zend_class_entry* . Do you think this is a good idea? Is this possible ? Do you have a solution for me? Best regards, --000000000000723ea905d1dfedf6--