gh-136759: rename lock.h to pylock.h (#137041)

Rename `lock.h` to `pylock.h` to avoid conflicts with headers of other projects.
This commit is contained in:
AN Long 2025-07-24 19:46:07 +09:00 committed by GitHub
parent ae4d27eba7
commit ec02db5caa
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 10 additions and 9 deletions

View file

@ -68,7 +68,7 @@
#include "pybuffer.h"
#include "pystats.h"
#include "pyatomic.h"
#include "lock.h"
#include "pylock.h"
#include "critical_section.h"
#include "object.h"
#include "refcount.h"

View file

@ -13,7 +13,7 @@ extern "C" {
# error "this header requires Py_BUILD_CORE define"
#endif
//_Py_UNLOCKED is defined as 0 and _Py_LOCKED as 1 in Include/cpython/lock.h
//_Py_UNLOCKED is defined as 0 and _Py_LOCKED as 1 in Include/cpython/pylock.h
#define _Py_HAS_PARKED 2
#define _Py_ONCE_INITIALIZED 4

View file

@ -6,7 +6,7 @@ extern "C" {
#ifndef Py_LIMITED_API
# define Py_CPYTHON_LOCK_H
# include "cpython/lock.h"
# include "cpython/pylock.h"
# undef Py_CPYTHON_LOCK_H
#endif