Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
Zope
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
Zope
Commits
771f7677
Commit
771f7677
authored
Nov 28, 2003
by
Jim Fulton
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
New implementation of Acquisition using new-style extension classes.
parent
2ca62e1a
Changes
5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
3167 additions
and
0 deletions
+3167
-0
lib/python/Acquisition/Acquisition.h
lib/python/Acquisition/Acquisition.h
+60
-0
lib/python/Acquisition/_Acquisition.c
lib/python/Acquisition/_Acquisition.c
+1573
-0
lib/python/Acquisition/__init__.py
lib/python/Acquisition/__init__.py
+1
-0
lib/python/Acquisition/setup.py
lib/python/Acquisition/setup.py
+23
-0
lib/python/Acquisition/tests.py
lib/python/Acquisition/tests.py
+1510
-0
No files found.
lib/python/Acquisition/Acquisition.h
0 → 100644
View file @
771f7677
/*****************************************************************************
Copyright (c) 1996-2002 Zope Corporation and Contributors.
All Rights Reserved.
This software is subject to the provisions of the Zope Public License,
Version 2.0 (ZPL). A copy of the ZPL should accompany this distribution.
THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
FOR A PARTICULAR PURPOSE
****************************************************************************/
#ifndef __ACQUISITION_H_
#define __ACQUISITION_H_
typedef
struct
{
PyObject
*
(
*
AQ_Acquire
)
(
PyObject
*
obj
,
PyObject
*
name
,
PyObject
*
filter
,
PyObject
*
extra
,
int
explicit
,
PyObject
*
deflt
,
int
containment
);
PyObject
*
(
*
AQ_Get
)
(
PyObject
*
obj
,
PyObject
*
name
,
PyObject
*
deflt
,
int
containment
);
int
(
*
AQ_IsWrapper
)
(
PyObject
*
obj
);
PyObject
*
(
*
AQ_Base
)
(
PyObject
*
obj
);
PyObject
*
(
*
AQ_Parent
)
(
PyObject
*
obj
);
PyObject
*
(
*
AQ_Self
)
(
PyObject
*
obj
);
PyObject
*
(
*
AQ_Inner
)
(
PyObject
*
obj
);
PyObject
*
(
*
AQ_Chain
)
(
PyObject
*
obj
,
int
containment
);
}
ACQUISITIONCAPI
;
#ifndef _IN_ACQUISITION_C
#define aq_Acquire(obj, name, filter, extra, explicit, deflt, containment ) (AcquisitionCAPI == NULL ? NULL : (AcquisitionCAPI->AQ_Acquire(obj, name, filter, extra, explicit, deflt, containment)))
#define aq_acquire(obj, name) (AcquisitionCAPI == NULL ? NULL : (AcquisitionCAPI->AQ_Acquire(obj, name, NULL, NULL, 1, NULL, 0)))
#define aq_get(obj, name, deflt, containment) (AcquistionCAPI == NULL ? NULL : (AcquisitionCAPI->AQ_Get(obj, name, deflt, containment)))
#define aq_isWrapper(obj) (AcquisitionCAPI == NULL ? -1 : (AcquisitionCAPI->AQ_IsWrapper(obj)))
#define aq_base(obj) (AcquisitionCAPI == NULL ? NULL : (AcquisitionCAPI->AQ_Base(obj)))
#define aq_parent(obj) (AcquisitionCAPI == NULL ? NULL : (AcquisitionCAPI->AQ_Parent(obj)))
#define aq_self(obj) (AcquisitionCAPI == NULL ? NULL : (AcquisitionCAPI->AQ_Self(obj)))
#define aq_inner(obj) (AcquisitionCAPI == NULL ? NULL : (AcquisitionCAPI->AQ_Inner(obj)))
#define aq_chain(obj, containment) (AcquisitionCAPI == NULL ? NULL : (AcquisitionCAPI->AQ_CHain(obj, containment)))
static
ACQUISITIONCAPI
*
AcquisitionCAPI
=
NULL
;
#define aq_init() { \
PyObject *module; \
PyObject *api; \
if (! (module = PyImport_ImportModule("Acquisition"))) return; \
if (! (api = PyObject_GetAttrString(module,"AcquisitionCAPI"))) return; \
Py_DECREF(module); \
AcquisitionCAPI = PyCObject_AsVoidPtr(api); \
Py_DECREF(api); \
}
#endif
#endif
lib/python/Acquisition/_Acquisition.c
0 → 100644
View file @
771f7677
This diff is collapsed.
Click to expand it.
lib/python/Acquisition/__init__.py
0 → 100644
View file @
771f7677
from
_Acquisition
import
*
lib/python/Acquisition/setup.py
0 → 100644
View file @
771f7677
##############################################################################
#
# Copyright (c) 2003 Zope Corporation and Contributors.
# All Rights Reserved.
#
# This software is subject to the provisions of the Zope Public License,
# Version 2.0 (ZPL). A copy of the ZPL should accompany this distribution.
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
# FOR A PARTICULAR PURPOSE.
#
##############################################################################
from
distutils.core
import
setup
,
Extension
setup
(
name
=
"_Acquisition"
,
version
=
"2.0"
,
ext_modules
=
[
Extension
(
"_Acquisition"
,
[
"_Acquisition.c"
],
include_dirs
=
[
'.'
,
'../ExtensionClass'
],
depends
=
[
"Acquisition.h"
,
'../ExtensionClass/ExtensionClass.h'
]),
])
lib/python/Acquisition/tests.py
0 → 100644
View file @
771f7677
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment