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
5a9a8a1a
Commit
5a9a8a1a
authored
Nov 17, 1998
by
Jim Fulton
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
*** empty log message ***
parent
0a94c2c2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
139 deletions
+0
-139
lib/Components/ExtensionClass/PyErr_Format.c
lib/Components/ExtensionClass/PyErr_Format.c
+0
-139
No files found.
lib/Components/ExtensionClass/PyErr_Format.c
deleted
100644 → 0
View file @
0a94c2c2
/***********************************************************
Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam,
The Netherlands.
All Rights Reserved
Permission to use, copy, modify, and distribute this software and its
documentation for any purpose and without fee is hereby granted,
provided that the above copyright notice appear in all copies and that
both that copyright notice and this permission notice appear in
supporting documentation, and that the names of Stichting Mathematisch
Centrum or CWI or Corporation for National Research Initiatives or
CNRI not be used in advertising or publicity pertaining to
distribution of the software without specific, written prior
permission.
While CWI is the initial source for this software, a modified version
is made available by the Corporation for National Research Initiatives
(CNRI) at the Internet address ftp://ftp.python.org.
STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH
CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
******************************************************************/
#include "Python.h"
PyObject
*
#ifdef HAVE_STDARG_PROTOTYPES
/* VARARGS 2 */
PyErr_Format
(
PyObject
*
ErrType
,
char
*
stringformat
,
char
*
format
,
...)
#else
/* VARARGS */
PyErr_Format
(
va_alist
)
va_dcl
#endif
{
va_list
va
;
PyObject
*
args
=
0
,
*
retval
=
0
;
#ifdef HAVE_STDARG_PROTOTYPES
va_start
(
va
,
format
);
#else
PyObject
*
ErrType
;
char
*
stringformat
,
*
format
;
va_start
(
va
);
ErrType
=
va_arg
(
va
,
PyObject
*
);
stringformat
=
va_arg
(
va
,
char
*
);
format
=
va_arg
(
va
,
char
*
);
#endif
if
(
format
)
args
=
Py_VaBuildValue
(
format
,
va
);
va_end
(
va
);
if
(
format
&&
!
args
)
return
NULL
;
if
(
stringformat
&&
!
(
retval
=
PyString_FromString
(
stringformat
)))
return
NULL
;
if
(
retval
)
{
if
(
args
)
{
PyObject
*
v
;
v
=
PyString_Format
(
retval
,
args
);
Py_DECREF
(
retval
);
Py_DECREF
(
args
);
if
(
!
v
)
return
NULL
;
retval
=
v
;
}
}
else
if
(
args
)
retval
=
args
;
else
{
PyErr_SetObject
(
ErrType
,
Py_None
);
return
NULL
;
}
PyErr_SetObject
(
ErrType
,
retval
);
Py_DECREF
(
retval
);
return
NULL
;
}
PyObject
*
#ifdef HAVE_STDARG_PROTOTYPES
/* VARARGS 2 */
PyString_Build
(
char
*
out_format
,
char
*
build_format
,
...)
#else
/* VARARGS */
PyString_Build
(
va_alist
)
va_dcl
#endif
{
va_list
va
;
PyObject
*
args
,
*
retval
,
*
fmt
;
#ifdef HAVE_STDARG_PROTOTYPES
va_start
(
va
,
build_format
);
#else
char
*
build_format
;
char
*
out_format
;
va_start
(
va
);
out_format
=
va_arg
(
va
,
char
*
);
build_format
=
va_arg
(
va
,
char
*
);
#endif
if
(
build_format
)
args
=
Py_VaBuildValue
(
build_format
,
va
);
else
args
=
PyTuple_New
(
0
);
va_end
(
va
);
if
(
!
args
)
return
NULL
;
if
(
!
PyTuple_Check
(
args
))
{
PyObject
*
a
;
a
=
PyTuple_New
(
1
);
if
(
!
a
)
return
NULL
;
if
(
PyTuple_SetItem
(
a
,
0
,
args
)
==
-
1
)
return
NULL
;
args
=
a
;
}
fmt
=
PyString_FromString
(
out_format
);
retval
=
PyString_Format
(
fmt
,
args
);
Py_DECREF
(
args
);
Py_DECREF
(
fmt
);
return
retval
;
}
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