- Notifications
You must be signed in to change notification settings - Fork750
Initial coreclr and build tooling#612
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Closed
Uh oh!
There was an error while loading.Please reload this page.
Closed
Changes fromall commits
Commits
Show all changes
18 commits Select commitHold shift + click to select a range
c98d6fb
Initial coreclr and build tooling
8bc01ad
Init variables outside of loop to avoid C compiler error
48b18a4
Merge branch 'master' into master
den-run-aifc30255
Revert netstandard2.0 Python.Runtime.dll for Windows
1f7ebd8
Remove unused _WIN32 strdup
1126819
Merge branch 'master' into master
filmorc2cd097
Merge branch 'master' into master
den-run-ai070a7fc
Merge branch 'master' into master
den-run-ai55171b9
Merge branch 'master' into master
filmor5425eb7
Merge branch 'master' into master
filmorb4b36fc
Merge branch 'master' into master
den-run-ai0e0f71f
Merge branch 'master' into master
den-run-ai4c19515
Merge branch 'master' into master
filmor58ac99d
Merge branch 'master' into master
filmor0670bde
Merge branch 'master' into master
filmor9bea24d
Merge branch 'master' into master
filmorea48a09
Merge branch 'master' into master
filmor149e4e5
Merge branch 'master' into master
filmorFile filter
Filter by extension
Conversations
Failed to load comments.
Loading
Uh oh!
There was an error while loading.Please reload this page.
Jump to
Jump to file
Failed to load files.
Loading
Uh oh!
There was an error while loading.Please reload this page.
Diff view
Diff view
There are no files selected for viewing
17 changes: 16 additions & 1 deletionsetup.py
This file contains hidden or 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
70 changes: 70 additions & 0 deletionssrc/coreclr/clrmod.c
This file contains hidden or 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,70 @@ | ||
#include "pynetclr.h" | ||
/* List of functions defined in the module */ | ||
static PyMethodDef clr_methods[] = { | ||
{NULL, NULL, 0, NULL} /* Sentinel */ | ||
}; | ||
PyDoc_STRVAR(clr_module_doc, | ||
"clr facade module to initialize the CLR. It's later " | ||
"replaced by the real clr module. This module has a facade " | ||
"attribute to make it distinguishable from the real clr module." | ||
); | ||
static PyNet_Args *pn_args; | ||
char **environ = NULL; | ||
#if PY_MAJOR_VERSION >= 3 | ||
static struct PyModuleDef clrdef = { | ||
PyModuleDef_HEAD_INIT, | ||
"clr", /* m_name */ | ||
clr_module_doc, /* m_doc */ | ||
-1, /* m_size */ | ||
clr_methods, /* m_methods */ | ||
NULL, /* m_reload */ | ||
NULL, /* m_traverse */ | ||
NULL, /* m_clear */ | ||
NULL, /* m_free */ | ||
}; | ||
#endif | ||
static PyObject *_initclr(void) | ||
{ | ||
PyObject *m; | ||
/* Create the module and add the functions */ | ||
#if PY_MAJOR_VERSION >= 3 | ||
m = PyModule_Create(&clrdef); | ||
#else | ||
m = Py_InitModule3("clr", clr_methods, clr_module_doc); | ||
#endif | ||
if (m == NULL) | ||
return NULL; | ||
PyModule_AddObject(m, "facade", Py_True); | ||
Py_INCREF(Py_True); | ||
pn_args = PyNet_Init(1); | ||
if (pn_args->error) | ||
{ | ||
return NULL; | ||
} | ||
if (NULL != pn_args->module) | ||
return pn_args->module; | ||
return m; | ||
} | ||
#if PY_MAJOR_VERSION >= 3 | ||
PyMODINIT_FUNC | ||
PyInit_clr(void) | ||
{ | ||
return _initclr(); | ||
} | ||
#else | ||
PyMODINIT_FUNC | ||
initclr(void) | ||
{ | ||
_initclr(); | ||
} | ||
#endif |
55 changes: 55 additions & 0 deletionssrc/coreclr/coreclrhost.h
This file contains hidden or 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,55 @@ | ||
// Licensed to the .NET Foundation under one or more agreements. | ||
// The .NET Foundation licenses this file to you under the MIT license. | ||
// See the LICENSE file in the project root for more information. | ||
// | ||
// APIs for hosting CoreCLR | ||
// | ||
#ifndef __CORECLR_HOST_H__ | ||
#define __CORECLR_HOST_H__ | ||
// For each hosting API, we define a function prototype and a function pointer | ||
// The prototype is useful for implicit linking against the dynamic coreclr | ||
// library and the pointer for explicit dynamic loading (dlopen, LoadLibrary) | ||
#define CORECLR_HOSTING_API(function, ...) \ | ||
int function(__VA_ARGS__); \ | ||
typedef int (*function##_ptr)(__VA_ARGS__) | ||
CORECLR_HOSTING_API(coreclr_initialize, | ||
const char* exePath, | ||
const char* appDomainFriendlyName, | ||
int propertyCount, | ||
const char** propertyKeys, | ||
const char** propertyValues, | ||
void** hostHandle, | ||
unsigned int* domainId); | ||
CORECLR_HOSTING_API(coreclr_shutdown, | ||
void* hostHandle, | ||
unsigned int domainId); | ||
CORECLR_HOSTING_API(coreclr_shutdown_2, | ||
void* hostHandle, | ||
unsigned int domainId, | ||
int* latchedExitCode); | ||
CORECLR_HOSTING_API(coreclr_create_delegate, | ||
void* hostHandle, | ||
unsigned int domainId, | ||
const char* entryPointAssemblyName, | ||
const char* entryPointTypeName, | ||
const char* entryPointMethodName, | ||
void** delegate); | ||
CORECLR_HOSTING_API(coreclr_execute_assembly, | ||
void* hostHandle, | ||
unsigned int domainId, | ||
int argc, | ||
const char** argv, | ||
const char* managedAssemblyPath, | ||
unsigned int* exitCode); | ||
#undef CORECLR_HOSTING_API | ||
#endif // __CORECLR_HOST_H__ |
Oops, something went wrong.
Uh oh!
There was an error while loading.Please reload this page.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.