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
db20880e
Commit
db20880e
authored
Feb 08, 2009
by
Hanno Schlichting
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Pull in Acquisition from the standalone package
parent
a8ccc89a
Changes
6
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
0 additions
and
4651 deletions
+0
-4651
lib/python/Acquisition/Acquisition.h
lib/python/Acquisition/Acquisition.h
+0
-60
lib/python/Acquisition/README.txt
lib/python/Acquisition/README.txt
+0
-417
lib/python/Acquisition/_Acquisition.c
lib/python/Acquisition/_Acquisition.c
+0
-1874
lib/python/Acquisition/__init__.py
lib/python/Acquisition/__init__.py
+0
-10
lib/python/Acquisition/interfaces.py
lib/python/Acquisition/interfaces.py
+0
-64
lib/python/Acquisition/tests.py
lib/python/Acquisition/tests.py
+0
-2226
No files found.
lib/python/Acquisition/Acquisition.h
deleted
100644 → 0
View file @
a8ccc89a
/*****************************************************************************
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.1 (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/README.txt
deleted
100644 → 0
View file @
a8ccc89a
This diff is collapsed.
Click to expand it.
lib/python/Acquisition/_Acquisition.c
deleted
100644 → 0
View file @
a8ccc89a
This diff is collapsed.
Click to expand it.
lib/python/Acquisition/__init__.py
deleted
100644 → 0
View file @
a8ccc89a
from
zope.interface
import
classImplements
from
_Acquisition
import
*
from
interfaces
import
IAcquirer
from
interfaces
import
IAcquisitionWrapper
classImplements
(
Explicit
,
IAcquirer
)
classImplements
(
ExplicitAcquisitionWrapper
,
IAcquisitionWrapper
)
classImplements
(
Implicit
,
IAcquirer
)
classImplements
(
ImplicitAcquisitionWrapper
,
IAcquisitionWrapper
)
lib/python/Acquisition/interfaces.py
deleted
100644 → 0
View file @
a8ccc89a
##############################################################################
#
# Copyright (c) 2005 Zope Corporation and Contributors. All Rights Reserved.
#
# This software is subject to the provisions of the Zope Public License,
# Version 2.1 (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.
#
##############################################################################
"""Acquisition z3 interfaces.
$Id$
"""
from
zope.interface
import
Attribute
from
zope.interface
import
Interface
class
IAcquirer
(
Interface
):
"""Acquire attributes from containers.
"""
def
__of__
(
context
):
"""Get the object in a context.
"""
class
IAcquisitionWrapper
(
Interface
):
"""Wrapper object for acquisition.
"""
def
aq_acquire
(
name
,
filter
=
None
,
extra
=
None
,
explicit
=
True
,
default
=
0
,
containment
=
0
):
"""Get an attribute, acquiring it if necessary.
"""
def
aq_inContextOf
(
obj
,
inner
=
1
):
"""Test whether the object is currently in the context of the argument.
"""
aq_base
=
Attribute
(
"""Get the object unwrapped."""
)
aq_parent
=
Attribute
(
"""Get the parent of an object."""
)
aq_self
=
Attribute
(
"""Get the object with the outermost wrapper removed."""
)
aq_inner
=
Attribute
(
"""Get the object with all but the innermost wrapper removed."""
)
aq_chain
=
Attribute
(
"""Get a list of objects in the acquisition environment."""
)
lib/python/Acquisition/tests.py
deleted
100644 → 0
View file @
a8ccc89a
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