Pyobjc

Latest version: v11.0

Safety actively analyzes 701298 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 18 of 18

0.2

------------------------------

- Accepts a struct.pack() string for pointer arguments, but...

- ... New methods on ObjCMethod: .pack_argument and .unpack_argument:
these should be used whenever an ObjC method expects a passed-by-reference
argument; for example, on NeXTSTEP [View getFrame:] expects a pointer
to an NXRect structure, that it will fill with the current frame of the
view: in this case you should use something similar to::

framep = aView.getFrame__.pack_argument (0)
aView.getFrame__ (framep)
frame = aView.getFrame__.unpack_argument (0, framep)

0.1

------------------------------

- Correctly handle pointer arguments.

- New syntax to get a class: ObjC.runtime.NameOfClass

- New syntax aliasing .new(): SomeClass()

- New Demo: LittleButtonedWindow, that tests points above.

- What follow is the recipe to get PyObjC dynamically loadable on NeXTSTEP:

* apply the patch in Misc/INSTALL.PyObjC to Python/importdl.c

* modify Python/Makefile adding the switch ``-ObjC`` to the importdl.o
build rule::

importdl.o: importdl.c
$(CC) -ObjC -c $(CFLAGS) -I$(DLINCLDIR) $(srcdir)/importdl.c

* modify Modules/Setup moving the PyObjC entry suggested above AFTER
``*shared*``, and remove ``-u libNeXT_s -lNeXT_s`` from it.

* run ``make``: this will update various files, in particular
Modules/Makefile.

* modify Modules/Makefile adding ``-u libNeXT_s -lNeXT_s`` to SYSLIBS::

SYSLIBS= $(LIBM) $(LIBC) -u libNeXT_s -lNeXT_s

* run ``make`` again

Page 18 of 18

© 2025 Safety CLI Cybersecurity Inc. All Rights Reserved.