Skip to content
This repository has been archived by the owner on Dec 6, 2018. It is now read-only.

Ported: Request #58369 import/export of variables #2

Open
nickl- opened this issue Aug 26, 2012 · 0 comments
Open

Ported: Request #58369 import/export of variables #2

nickl- opened this issue Aug 26, 2012 · 0 comments

Comments

@nickl-
Copy link
Collaborator

nickl- commented Aug 26, 2012

Request #58369 import/export of variables
Submitted: 2008-10-07 02:43 UTC Modified: 2008-10-20 01:07 UTC
Votes: 1
Avg. Score: 3.0 ± 0.0
Reproduced: 1 of 1 (100.0%)
Same Version: 1 (100.0%)
Same OS: 1 (100.0%)
From: christoph dot hintermueller at psi dot ch Assigned: jon
Status: Assigned Package: python (PECL)
PHP Version: 5.1.2 OS: Linux
Private report: No CVE-ID:

[2008-10-07 02:43 UTC] christoph dot hintermueller at psi dot ch

Description:

How far are the efforts on implementing shared import/export of
variables. Half a year ago when i sent a patch which reactivated
the code which implements a copy on import/export
mechanisms for variables which are used by both Python and
PHP. I do agree that is not the best solution as it consumes the
memory twice and does not allow to track if a variable is
reexported/reimported from/to python. At the moment all
variables which are not boolean, integger, float or string seem to
be converted to a string which can be brought back to life by
means of eval command. Which is an even worse approach then
the copy on import/export.

Thus would you support the following following 3 Step apporach
to get from the current situation where only simply types are
properly shared to a full share on import/export approach.

  1. Officially reactivate the copy on export/import mechanism and
    clearly mark it as temporary solution, or at least provide it as non
    supported non official patch. Whichcan be downloaded separatly
    from the PECL page but may not be usable with newer PiP
    versions and deffinitly not with those using step 2 for
    importing/exporting variables to/from Python.
  2. Implement wrapper classes properly mapping PHP zvalues to
    python classes behaving like the python types coresponding to
    the PHP type. (wrap on import)
    2b) Implement share on export by copying the python variable to
    a zvalue and replacing the original python value by its reimported
    PHP counterpart.
  3. Implement ture share on export: would require how to make a
    python object appear as zvalue which behaves like native PHP
    zvalues.

Is the above approach possible at all how difficult would it be
and how power full would it be?

Xris

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant