Skip to content

hernad/ziher

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

What is ziher? Find here.

ziher

python

C:\dev\ziher\ziher_mono\ziher\src\bazel-bin\test>dir f18ziherpy.pyd
 Volume in drive C has no label.
 Volume Serial Number is F0E2-A75E

 Directory of C:\dev\ziher\ziher_mono\ziher\src\bazel-bin\test

27. 08. 2022.  15:41            16.896 f18ziherpy.pyd
               1 File(s)         16.896 bytes
               0 Dir(s)  762.793.041.920 bytes free
C:\dev\ziher\ziher_mono\ziher\src\bazel-bin\test>dumpbin /dependents f18ziherpy.pyd

Dump of file f18ziherpy.pyd

File Type: DLL

  Image has the following dependencies:
    ziher.dll
    hello_py.dll
    python3.dll
    VCRUNTIME140.dll
    api-ms-win-crt-stdio-l1-1-0.dll
    api-ms-win-crt-runtime-l1-1-0.dll
    api-ms-win-crt-string-l1-1-0.dll
    KERNEL32.dll

  Summary

        1000 .data
        1000 .pdata
        2000 .rdata
        1000 .reloc
        2000 .text
C:\dev\ziher\ziher_mono\ziher\src\bazel-bin\test>dumpbin /exports f18ziherpy.pyd
Dump of file f18ziherpy.pyd
File Type: DLL
  Section contains the following exports for f18ziherpy.dll

    00000000 characteristics
    FFFFFFFF time date stamp
        0.00 version
           1 ordinal base
           2 number of functions
           2 number of names

    ordinal hint RVA      name

          1    0 00001720 PyInit_f18ziherpy = PyInit_f18ziherpy
          2    1 00001000 hello_py_ext_101 = hello_py_ext_101

Ziher from python

run parametri: MAIN - ime funkcije, 1 - init console, 1 - release console

>>> import f18ziherpy
>>> f18ziherpy.vminit();f18ziherpy.run("MAIN",1,1);f18ziherpy.run("MAIN",1,1);quit()

callback lamda funkcija

Definišemo lamda funkciju x+y+3. Poziv init console=1, release console=1 f18ziherpy.hash('ZIHER_TO_PY',1,1). Hash vraća python dict objekat napunjen unutar ziher kao hash varijabla.

python -c "callback = lambda x,y: x+y+3;import f18ziherpy;f18ziherpy.vminit();f18ziherpy.set_callback(callback);ret=f18ziherpy.hash('ZIHER_TO_PY',1,1);print(ret);quit()"

dva setovanja callback-a i dva hash poziva

python -c "callback = lambda x,y: x+y+3;import f18ziherpy;f18ziherpy.vminit();f18ziherpy.set_callback(callback);ret=f18ziherpy.hash('ZIHER_TO_PY',1,1);print(ret);callback2 = lambda x,y: x+y+23;f18ziherpy.set_callback(callback2);print(f18ziherpy.hash('ZIHER_TO_PY',1,1));quit()"

About

Software. Past -> Rethink -> Future.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published