forked from pythonnet/pythonnet
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'pr/tested/15-init_from_config' into master-rhino-8.x
- Loading branch information
Showing
3 changed files
with
65 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
using System; | ||
using System.Runtime.InteropServices; | ||
|
||
namespace Python.Runtime.Native; | ||
|
||
#pragma warning disable CS0169 | ||
|
||
[StructLayout(LayoutKind.Sequential)] | ||
struct PyConfig | ||
{ | ||
int _config_init; | ||
public int isolated; | ||
int use_environment; | ||
int dev_mode; | ||
public int install_signal_handlers; | ||
|
||
// Create an int array of size 256 as padding | ||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 1024)] | ||
int[] padding; | ||
} | ||
|
||
public enum PyStatusType : int | ||
{ | ||
PyStatus_Ok, | ||
PyStatus_Error, | ||
PyStatus_Exception, | ||
PyStatus_Exit | ||
} | ||
|
||
struct PyStatus | ||
{ | ||
public PyStatusType type; | ||
IntPtr func; | ||
IntPtr err_msg; | ||
int exitcode; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters