Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
6a325f12
Commit
6a325f12
authored
Jan 05, 2006
by
Martin v. Löwis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Stop maintaining the buildno file.
Also, stop determining Unicode sizes with PyString_GET_SIZE.
parent
1a7b1c8d
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
88 additions
and
37 deletions
+88
-37
Makefile.pre.in
Makefile.pre.in
+10
-18
Modules/getbuildinfo.c
Modules/getbuildinfo.c
+14
-5
Objects/unicodeobject.c
Objects/unicodeobject.c
+15
-12
configure
configure
+46
-2
configure.in
configure.in
+3
-0
No files found.
Makefile.pre.in
View file @
6a325f12
...
...
@@ -33,6 +33,7 @@ CXX= @CXX@
LINKCC
=
@LINKCC@
AR
=
@AR@
RANLIB
=
@RANLIB@
SVNVERSION
=
@SVNVERSION@
# Shell used by make (some versions default to the login shell, which is bad)
SHELL
=
/bin/sh
...
...
@@ -341,21 +342,6 @@ sharedmods: $(BUILDPYTHON)
*
)
$(RUNSHARED)
CC
=
'
$(CC)
'
LDSHARED
=
'
$(BLDSHARED)
'
OPT
=
'
$(OPT)
'
./
$(BUILDPYTHON)
-E
$(srcdir)
/setup.py build
;;
\
esac
# buildno should really depend on something like LIBRARY_SRC
buildno
:
$(PARSER_OBJS)
\
$(OBJECT_OBJS)
\
$(PYTHON_OBJS)
\
$(MODULE_OBJS)
\
$(SIGNAL_OBJS)
\
$(MODOBJS)
\
$(srcdir)/Modules/getbuildinfo.c
if
test
-d
$(srcdir)
/.svn
-a
"
`
which svnversion 2> /dev/null
`
"
;
then
\
svnversion
$(srcdir)
>
buildno
;
\
elif
test
-f
buildno
;
then
\
expr
`
cat
buildno
`
+ 1
>
buildno1
;
\
mv
-f
buildno1 buildno
;
\
else
echo
1
>
buildno
;
fi
# Build static library
# avoid long command lines, same as LIBRARY_OBJS
$(LIBRARY)
:
$(LIBRARY_OBJS)
...
...
@@ -445,8 +431,14 @@ Modules/Setup: $(srcdir)/Modules/Setup.dist
############################################################################
# Special rules for object files
Modules/getbuildinfo.o
:
$(srcdir)/Modules/getbuildinfo.c buildno
$(CC)
-c
$(PY_CFLAGS)
-DBUILD
=
\"
`
cat
buildno
`
\"
-o
$@
$(srcdir)
/Modules/getbuildinfo.c
Modules/getbuildinfo.o
:
$(PARSER_OBJS)
\
$(OBJECT_OBJS)
\
$(PYTHON_OBJS)
\
$(MODULE_OBJS)
\
$(SIGNAL_OBJS)
\
$(MODOBJS)
\
$(srcdir)/Modules/getbuildinfo.c
$(CC)
-c
$(PY_CFLAGS)
-DSVNVERSION
=
\"
`
LANG
=
C
$(SVNVERSION)
$(srcdir)
`
\"
-o
$@
$(srcdir)
/Modules/getbuildinfo.c
Modules/getpath.o
:
$(srcdir)/Modules/getpath.c Makefile
$(CC)
-c
$(PY_CFLAGS)
-DPYTHONPATH
=
'"
$(PYTHONPATH)
"'
\
...
...
@@ -990,7 +982,7 @@ clobber: clean
# remove all generated files, even Makefile[.pre]
# Keep configure and Python-ast.[ch], it's possible they can't be generated
distclean
:
clobber
-
rm
-f
core Makefile Makefile.pre
buildno
config.status
\
-
rm
-f
core Makefile Makefile.pre config.status
\
Modules/Setup Modules/Setup.local Modules/Setup.config
find
$(srcdir)
'('
-name
'*.fdc'
-o
-name
'*~'
\
-o
-name
'[@,#]*'
-o
-name
'*.old'
\
...
...
Modules/getbuildinfo.c
View file @
6a325f12
...
...
@@ -20,21 +20,30 @@
#endif
#endif
#ifndef BUILD
#define BUILD "0"
#endif
static
const
char
revision
[]
=
"$Revision$"
;
static
const
char
headurl
[]
=
"$HeadURL$"
;
const
char
*
Py_GetBuildInfo
(
void
)
{
static
char
buildinfo
[
50
];
#ifdef SVNVERSION
static
char
svnversion
[]
=
SVNVERSION
;
#else
static
char
svnversion
[
20
]
=
"unknown"
;
if
(
strstr
(
headurl
,
"/tags/"
)
!=
NULL
)
{
int
start
=
;
strncpy
(
svnversion
,
revision
+
start
,
stop
-
start
);
svnversion
[
stop
-
start
]
=
'\0'
;
}
#endif
PyOS_snprintf
(
buildinfo
,
sizeof
(
buildinfo
),
"%s, %.20s, %.9s"
,
BUILD
,
DATE
,
TIME
);
"%s, %.20s, %.9s"
,
svnversion
,
DATE
,
TIME
);
return
buildinfo
;
}
const
char
*
Py_GetBuildNumber
(
void
)
{
return
BUILD
;
return
"0"
;
}
Objects/unicodeobject.c
View file @
6a325f12
...
...
@@ -5357,7 +5357,7 @@ unicode_islower(PyUnicodeObject *self)
return
PyBool_FromLong
(
Py_UNICODE_ISLOWER
(
*
p
));
/* Special case for empty strings */
if
(
Py
String
_GET_SIZE
(
self
)
==
0
)
if
(
Py
Unicode
_GET_SIZE
(
self
)
==
0
)
return
PyBool_FromLong
(
0
);
e
=
p
+
PyUnicode_GET_SIZE
(
self
);
...
...
@@ -5391,7 +5391,7 @@ unicode_isupper(PyUnicodeObject *self)
return
PyBool_FromLong
(
Py_UNICODE_ISUPPER
(
*
p
)
!=
0
);
/* Special case for empty strings */
if
(
Py
String
_GET_SIZE
(
self
)
==
0
)
if
(
Py
Unicode
_GET_SIZE
(
self
)
==
0
)
return
PyBool_FromLong
(
0
);
e
=
p
+
PyUnicode_GET_SIZE
(
self
);
...
...
@@ -5428,7 +5428,7 @@ unicode_istitle(PyUnicodeObject *self)
(
Py_UNICODE_ISUPPER
(
*
p
)
!=
0
));
/* Special case for empty strings */
if
(
Py
String
_GET_SIZE
(
self
)
==
0
)
if
(
Py
Unicode
_GET_SIZE
(
self
)
==
0
)
return
PyBool_FromLong
(
0
);
e
=
p
+
PyUnicode_GET_SIZE
(
self
);
...
...
@@ -5473,7 +5473,7 @@ unicode_isspace(PyUnicodeObject *self)
return
PyBool_FromLong
(
1
);
/* Special case for empty strings */
if
(
Py
String
_GET_SIZE
(
self
)
==
0
)
if
(
Py
Unicode
_GET_SIZE
(
self
)
==
0
)
return
PyBool_FromLong
(
0
);
e
=
p
+
PyUnicode_GET_SIZE
(
self
);
...
...
@@ -5502,7 +5502,7 @@ unicode_isalpha(PyUnicodeObject *self)
return
PyBool_FromLong
(
1
);
/* Special case for empty strings */
if
(
Py
String
_GET_SIZE
(
self
)
==
0
)
if
(
Py
Unicode
_GET_SIZE
(
self
)
==
0
)
return
PyBool_FromLong
(
0
);
e
=
p
+
PyUnicode_GET_SIZE
(
self
);
...
...
@@ -5531,7 +5531,7 @@ unicode_isalnum(PyUnicodeObject *self)
return
PyBool_FromLong
(
1
);
/* Special case for empty strings */
if
(
Py
String
_GET_SIZE
(
self
)
==
0
)
if
(
Py
Unicode
_GET_SIZE
(
self
)
==
0
)
return
PyBool_FromLong
(
0
);
e
=
p
+
PyUnicode_GET_SIZE
(
self
);
...
...
@@ -5560,7 +5560,7 @@ unicode_isdecimal(PyUnicodeObject *self)
return
PyBool_FromLong
(
1
);
/* Special case for empty strings */
if
(
Py
String
_GET_SIZE
(
self
)
==
0
)
if
(
Py
Unicode
_GET_SIZE
(
self
)
==
0
)
return
PyBool_FromLong
(
0
);
e
=
p
+
PyUnicode_GET_SIZE
(
self
);
...
...
@@ -5589,7 +5589,7 @@ unicode_isdigit(PyUnicodeObject *self)
return
PyBool_FromLong
(
1
);
/* Special case for empty strings */
if
(
Py
String
_GET_SIZE
(
self
)
==
0
)
if
(
Py
Unicode
_GET_SIZE
(
self
)
==
0
)
return
PyBool_FromLong
(
0
);
e
=
p
+
PyUnicode_GET_SIZE
(
self
);
...
...
@@ -5618,7 +5618,7 @@ unicode_isnumeric(PyUnicodeObject *self)
return
PyBool_FromLong
(
1
);
/* Special case for empty strings */
if
(
Py
String
_GET_SIZE
(
self
)
==
0
)
if
(
Py
Unicode
_GET_SIZE
(
self
)
==
0
)
return
PyBool_FromLong
(
0
);
e
=
p
+
PyUnicode_GET_SIZE
(
self
);
...
...
@@ -6453,14 +6453,14 @@ unicode_subscript(PyUnicodeObject* self, PyObject* item)
if
(
PyInt_Check
(
item
))
{
long
i
=
PyInt_AS_LONG
(
item
);
if
(
i
<
0
)
i
+=
Py
String
_GET_SIZE
(
self
);
i
+=
Py
Unicode
_GET_SIZE
(
self
);
return
unicode_getitem
(
self
,
i
);
}
else
if
(
PyLong_Check
(
item
))
{
long
i
=
PyLong_AsLong
(
item
);
if
(
i
==
-
1
&&
PyErr_Occurred
())
return
NULL
;
if
(
i
<
0
)
i
+=
Py
String
_GET_SIZE
(
self
);
i
+=
Py
Unicode
_GET_SIZE
(
self
);
return
unicode_getitem
(
self
,
i
);
}
else
if
(
PySlice_Check
(
item
))
{
int
start
,
stop
,
step
,
slicelength
,
cur
,
i
;
...
...
@@ -6468,7 +6468,7 @@ unicode_subscript(PyUnicodeObject* self, PyObject* item)
Py_UNICODE
*
result_buf
;
PyObject
*
result
;
if
(
PySlice_GetIndicesEx
((
PySliceObject
*
)
item
,
Py
String
_GET_SIZE
(
self
),
if
(
PySlice_GetIndicesEx
((
PySliceObject
*
)
item
,
Py
Unicode
_GET_SIZE
(
self
),
&
start
,
&
stop
,
&
step
,
&
slicelength
)
<
0
)
{
return
NULL
;
}
...
...
@@ -6478,6 +6478,9 @@ unicode_subscript(PyUnicodeObject* self, PyObject* item)
}
else
{
source_buf
=
PyUnicode_AS_UNICODE
((
PyObject
*
)
self
);
result_buf
=
PyMem_MALLOC
(
slicelength
*
sizeof
(
Py_UNICODE
));
if
(
result_buf
==
NULL
)
return
PyErr_NoMemory
();
for
(
cur
=
start
,
i
=
0
;
i
<
slicelength
;
cur
+=
step
,
i
++
)
{
result_buf
[
i
]
=
source_buf
[
cur
];
...
...
configure
View file @
6a325f12
#! /bin/sh
# From configure.in Revision: 41
764
.
# From configure.in Revision: 41
852
.
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.59 for python 2.5.
#
...
...
@@ -312,7 +312,7 @@ ac_includes_default="\
# include <unistd.h>
#endif"
ac_subst_vars
=
'SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS VERSION SOVERSION CONFIG_ARGS PYTHONFRAMEWORK PYTHONFRAMEWORKDIR PYTHONFRAMEWORKPREFIX PYTHONFRAMEWORKINSTALLDIR MACHDEP SGI_ABI EXTRAPLATDIR EXTRAMACHDEPPATH CONFIGURE_MACOSX_DEPLOYMENT_TARGET CXX MAINOBJ EXEEXT CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC OBJEXT CPP EGREP BUILDEXEEXT LIBRARY LDLIBRARY DLLLIBRARY BLDLIBRARY LDLIBRARYDIR INSTSONAME RUNSHARED LINKCC RANLIB ac_ct_RANLIB AR INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA LN OPT BASECFLAGS OTHER_LIBTOOL_OPT LIBTOOL_CRUFT SO LDSHARED BLDSHARED CCSHARED LINKFORSHARED CFLAGSFORSHARED SHLIBS USE_SIGNAL_MODULE SIGNAL_OBJS USE_THREAD_MODULE LDLAST THREADOBJ DLINCLDIR DYNLOADFILE MACHDEP_OBJS TRUE LIBOBJS HAVE_GETHOSTBYNAME_R_6_ARG HAVE_GETHOSTBYNAME_R_5_ARG HAVE_GETHOSTBYNAME_R_3_ARG HAVE_GETHOSTBYNAME_R HAVE_GETHOSTBYNAME LIBM LIBC UNICODE_OBJS THREADHEADERS SRCDIRS LTLIBOBJS'
ac_subst_vars
=
'SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS VERSION SOVERSION CONFIG_ARGS PYTHONFRAMEWORK PYTHONFRAMEWORKDIR PYTHONFRAMEWORKPREFIX PYTHONFRAMEWORKINSTALLDIR MACHDEP SGI_ABI EXTRAPLATDIR EXTRAMACHDEPPATH CONFIGURE_MACOSX_DEPLOYMENT_TARGET CXX MAINOBJ EXEEXT CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC OBJEXT CPP EGREP BUILDEXEEXT LIBRARY LDLIBRARY DLLLIBRARY BLDLIBRARY LDLIBRARYDIR INSTSONAME RUNSHARED LINKCC RANLIB ac_ct_RANLIB AR
SVNVERSION
INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA LN OPT BASECFLAGS OTHER_LIBTOOL_OPT LIBTOOL_CRUFT SO LDSHARED BLDSHARED CCSHARED LINKFORSHARED CFLAGSFORSHARED SHLIBS USE_SIGNAL_MODULE SIGNAL_OBJS USE_THREAD_MODULE LDLAST THREADOBJ DLINCLDIR DYNLOADFILE MACHDEP_OBJS TRUE LIBOBJS HAVE_GETHOSTBYNAME_R_6_ARG HAVE_GETHOSTBYNAME_R_5_ARG HAVE_GETHOSTBYNAME_R_3_ARG HAVE_GETHOSTBYNAME_R HAVE_GETHOSTBYNAME LIBM LIBC UNICODE_OBJS THREADHEADERS SRCDIRS LTLIBOBJS'
ac_subst_files
=
''
# Initialize some variables set by options.
...
...
@@ -3575,6 +3575,49 @@ done
test
-n
"
$AR
"
||
AR
=
"ar"
for
ac_prog
in
svnversion
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set
dummy
$ac_prog
;
ac_word
=
$2
echo
"
$as_me
:
$LINENO
: checking for
$ac_word
"
>
&5
echo
$ECHO_N
"checking for
$ac_word
...
$ECHO_C
"
>
&6
if
test
"
${
ac_cv_prog_SVNVERSION
+set
}
"
=
set
;
then
echo
$ECHO_N
"(cached)
$ECHO_C
"
>
&6
else
if
test
-n
"
$SVNVERSION
"
;
then
ac_cv_prog_SVNVERSION
=
"
$SVNVERSION
"
# Let the user override the test.
else
as_save_IFS
=
$IFS
;
IFS
=
$PATH_SEPARATOR
for
as_dir
in
$PATH
do
IFS
=
$as_save_IFS
test
-z
"
$as_dir
"
&&
as_dir
=
.
for
ac_exec_ext
in
''
$ac_executable_extensions
;
do
if
$as_executable_p
"
$as_dir
/
$ac_word$ac_exec_ext
"
;
then
ac_cv_prog_SVNVERSION
=
"
$ac_prog
"
echo
"
$as_me
:
$LINENO
: found
$as_dir
/
$ac_word$ac_exec_ext
"
>
&5
break
2
fi
done
done
fi
fi
SVNVERSION
=
$ac_cv_prog_SVNVERSION
if
test
-n
"
$SVNVERSION
"
;
then
echo
"
$as_me
:
$LINENO
: result:
$SVNVERSION
"
>
&5
echo
"
${
ECHO_T
}
$SVNVERSION
"
>
&6
else
echo
"
$as_me
:
$LINENO
: result: no"
>
&5
echo
"
${
ECHO_T
}
no"
>
&6
fi
test
-n
"
$SVNVERSION
"
&&
break
done
test
-n
"
$SVNVERSION
"
||
SVNVERSION
=
"echo no svnversion"
case
$MACHDEP
in
bsdos
*
|
hp
*
|
HP
*
)
# install -d does not work on BSDI or HP-UX
...
...
@@ -21477,6 +21520,7 @@ s,@LINKCC@,$LINKCC,;t t
s,@RANLIB@,
$RANLIB
,;t t
s,@ac_ct_RANLIB@,
$ac_ct_RANLIB
,;t t
s,@AR@,
$AR
,;t t
s,@SVNVERSION@,
$SVNVERSION
,;t t
s,@INSTALL_PROGRAM@,
$INSTALL_PROGRAM
,;t t
s,@INSTALL_SCRIPT@,
$INSTALL_SCRIPT
,;t t
s,@INSTALL_DATA@,
$INSTALL_DATA
,;t t
...
...
configure.in
View file @
6a325f12
...
...
@@ -618,6 +618,9 @@ AC_PROG_RANLIB
AC_SUBST(AR)
AC_CHECK_PROGS(AR, ar aal, ar)
AC_SUBST(SVNVERSION)
AC_CHECK_PROGS(SVNVERSION, svnversion, [echo no svnversion])
case $MACHDEP in
bsdos*|hp*|HP*)
# install -d does not work on BSDI or HP-UX
...
...
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