dongyukun
2025-02-21 2bf209dce77d2a8236dbeb14e110e300acc45452
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#pragma once
#include"cstring"
#include<fstream>
#include<iostream>
#include<string>
#include<stdio.h>
#include <Windows.h>  
#include "Python.h"
 
#include <thread>
 
#ifdef PYGILTHREADLOCK_EXPORTS
#define PYGILTHREADLOCK_API  __declspec(dllexport)
#else
#define PYGILTHREADLOCK_API  __declspec(dllimport)
#endif  
 
 
 
 
/*È«¾Ö½âÊͺÍÏß³ÌËø*/
PYGILTHREADLOCK_API class PyGILThreadLock
{
public:
    PyGILThreadLock();
    ~PyGILThreadLock();
 
private:
    PyGILState_STATE gstate;
    PyThreadState *_save;
    int nStatus;
};