Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
cpython
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Batuhan Osman TASKAYA
cpython
Commits
275c8487
Kaydet (Commit)
275c8487
authored
Eki 31, 2012
tarafından
Benjamin Peterson
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Sade Fark
merge heads
üst
d1f2cb37
64085e30
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
18 additions
and
21 deletions
+18
-21
sys.rst
Doc/c-api/sys.rst
+0
-6
refcounts.dat
Doc/data/refcounts.dat
+0
-4
embedding.rst
Doc/extending/embedding.rst
+13
-8
ctypes.rst
Doc/library/ctypes.rst
+2
-2
NEWS
Misc/NEWS
+2
-0
_collectionsmodule.c
Modules/_collectionsmodule.c
+1
-1
No files found.
Doc/c-api/sys.rst
Dosyayı görüntüle @
275c8487
...
@@ -61,12 +61,6 @@ accessible to C code. They all work with the current interpreter thread's
...
@@ -61,12 +61,6 @@ accessible to C code. They all work with the current interpreter thread's
Return the object *name* from the :mod:`sys` module or *NULL* if it does
Return the object *name* from the :mod:`sys` module or *NULL* if it does
not exist, without setting an exception.
not exist, without setting an exception.
.. c:function:: FILE *PySys_GetFile(char *name, FILE *def)
Return the :c:type:`FILE*` associated with the object *name* in the
:mod:`sys` module, or *def* if *name* is not in the module or is not associated
with a :c:type:`FILE*`.
.. c:function:: int PySys_SetObject(char *name, PyObject *v)
.. c:function:: int PySys_SetObject(char *name, PyObject *v)
Set *name* in the :mod:`sys` module to *v* unless *v* is *NULL*, in which
Set *name* in the :mod:`sys` module to *v* unless *v* is *NULL*, in which
...
...
Doc/data/refcounts.dat
Dosyayı görüntüle @
275c8487
...
@@ -1310,10 +1310,6 @@ PySys_AddWarnOption:char*:s::
...
@@ -1310,10 +1310,6 @@ PySys_AddWarnOption:char*:s::
PySys_AddXOption:void:::
PySys_AddXOption:void:::
PySys_AddXOption:const wchar_t*:s::
PySys_AddXOption:const wchar_t*:s::
PySys_GetFile:FILE*:::
PySys_GetFile:char*:name::
PySys_GetFile:FILE*:def::
PySys_GetObject:PyObject*::0:
PySys_GetObject:PyObject*::0:
PySys_GetObject:char*:name::
PySys_GetObject:char*:name::
...
...
Doc/extending/embedding.rst
Dosyayı görüntüle @
275c8487
...
@@ -58,6 +58,7 @@ perform some operation on a file. ::
...
@@ -58,6 +58,7 @@ perform some operation on a file. ::
int
int
main(int argc, char *argv[])
main(int argc, char *argv[])
{
{
Py_SetProgramName(argv[0]); /* optional but recommended */
Py_Initialize();
Py_Initialize();
PyRun_SimpleString("from time import time,ctime\n"
PyRun_SimpleString("from time import time,ctime\n"
"print('Today is', ctime(time()))\n");
"print('Today is', ctime(time()))\n");
...
@@ -65,14 +66,18 @@ perform some operation on a file. ::
...
@@ -65,14 +66,18 @@ perform some operation on a file. ::
return 0;
return 0;
}
}
The above code first initializes the Python interpreter with
Function :c:func:`Py_SetProgramName` should be called before
:c:func:`Py_Initialize`, followed by the execution of a hard-coded Python script
:c:func:`Py_Initialize` to inform the interpreter about paths to
that print the date and time. Afterwards, the :c:func:`Py_Finalize` call shuts
Python run-time libraries. Next initialize the Python interpreter
the interpreter down, followed by the end of the program. In a real program,
with :c:func:`Py_Initialize`, followed by the execution of a
you may want to get the Python script from another source, perhaps a text-editor
hard-coded Python script that prints the date and time. Afterwards,
routine, a file, or a database. Getting the Python code from a file can better
the :c:func:`Py_Finalize` call shuts the interpreter down, followed by
be done by using the :c:func:`PyRun_SimpleFile` function, which saves you the
the end of the program. In a real program, you may want to get the
trouble of allocating memory space and loading the file contents.
Python script from another source, perhaps a text-editor routine, a
file, or a database. Getting the Python code from a file can better
be done by using the :c:func:`PyRun_SimpleFile` function, which saves
you the trouble of allocating memory space and loading the file
contents.
.. _lower-level-embedding:
.. _lower-level-embedding:
...
...
Doc/library/ctypes.rst
Dosyayı görüntüle @
275c8487
...
@@ -1155,8 +1155,8 @@ testing. Try it out with ``import __hello__`` for example.
...
@@ -1155,8 +1155,8 @@ testing. Try it out with ``import __hello__`` for example.
Surprises
Surprises
^^^^^^^^^
^^^^^^^^^
There are some edges in :mod:`ctypes` where you m
ay be expect something else than
There are some edges in :mod:`ctypes` where you m
ight expect something other
what actually happens.
than
what actually happens.
Consider the following example::
Consider the following example::
...
...
Misc/NEWS
Dosyayı görüntüle @
275c8487
...
@@ -61,6 +61,8 @@ Core and Builtins
...
@@ -61,6 +61,8 @@ Core and Builtins
- Issue #15368: An issue that caused bytecode generation to be
- Issue #15368: An issue that caused bytecode generation to be
non-deterministic when using randomized hashing (-R) has been fixed.
non-deterministic when using randomized hashing (-R) has been fixed.
- Issue #16369: Global PyTypeObjects not initialized with PyType_Ready(...).
- Issue #15020: The program name used to search for Python's path is now
- Issue #15020: The program name used to search for Python's path is now
"python3" under Unix, not "python".
"python3" under Unix, not "python".
...
...
Modules/_collectionsmodule.c
Dosyayı görüntüle @
275c8487
...
@@ -1019,7 +1019,7 @@ static PyMethodDef deque_methods[] = {
...
@@ -1019,7 +1019,7 @@ static PyMethodDef deque_methods[] = {
};
};
PyDoc_STRVAR
(
deque_doc
,
PyDoc_STRVAR
(
deque_doc
,
"deque(
iterable[, maxlen
]) --> deque object
\n
\
"deque(
[iterable[, maxlen]
]) --> deque object
\n
\
\n
\
\n
\
Build an ordered collection with optimized access from its endpoints."
);
Build an ordered collection with optimized access from its endpoints."
);
...
...
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