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
21151760
Kaydet (Commit)
21151760
authored
Mar 31, 2009
tarafından
Georg Brandl
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
#5548: do return the new module from PyMODINIT_FUNC functions.
üst
5081f7e9
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
3 deletions
+5
-3
extending.rst
Doc/extending/extending.rst
+4
-3
newtypes.rst
Doc/extending/newtypes.rst
+1
-0
No files found.
Doc/extending/extending.rst
Dosyayı görüntüle @
21151760
...
@@ -1266,12 +1266,13 @@ All that a client module must do in order to have access to the function
...
@@ -1266,12 +1266,13 @@ All that a client module must do in order to have access to the function
{
{
PyObject *m;
PyObject *m;
m = Py
_InitModule("client", ClientMethods
);
m = Py
Module_Create(&clientmodule
);
if (m == NULL)
if (m == NULL)
return;
return
NULL
;
if (import_spam() < 0)
if (import_spam() < 0)
return;
return
NULL
;
/* additional initialization can happen here */
/* additional initialization can happen here */
return m;
}
}
The main disadvantage of this approach is that the file :file:`spammodule.h` is
The main disadvantage of this approach is that the file :file:`spammodule.h` is
...
...
Doc/extending/newtypes.rst
Dosyayı görüntüle @
21151760
...
@@ -871,6 +871,7 @@ the module's :cfunc:`init` function. ::
...
@@ -871,6 +871,7 @@ the module's :cfunc:`init` function. ::
Py_INCREF(&ShoddyType);
Py_INCREF(&ShoddyType);
PyModule_AddObject(m, "Shoddy", (PyObject *) &ShoddyType);
PyModule_AddObject(m, "Shoddy", (PyObject *) &ShoddyType);
return m;
}
}
Before calling :cfunc:`PyType_Ready`, the type structure must have the
Before calling :cfunc:`PyType_Ready`, the type structure must have the
...
...
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