-
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.
feat(gui): dropping ui because it would require pthreads.
It's possible, but there are too many dependencies, not worth it.
- Loading branch information
Showing
14 changed files
with
83 additions
and
891 deletions.
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
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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,6 @@ | ||
#!/bin/bash | ||
|
||
pushd src/lib/Go/lib &&\ | ||
go build -o main.so -buildmode=c-shared main.go &&\ | ||
cpp -P ./main.h ./main.static.h &&\ | ||
popd || exit |
This file was deleted.
Oops, something went wrong.
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,17 @@ | ||
<?php | ||
namespace CatPaw\Go; | ||
|
||
interface Contract { | ||
// ################################# | ||
// ################################# | ||
// ################################# | ||
// ################################# | ||
// ################################# | ||
// ======================[START]===> Utilities | ||
/** | ||
* Destroy a reference from memory. | ||
* @param mixed $key Reference key. | ||
* @return void | ||
*/ | ||
function destroy(mixed $key):void; | ||
} |
File renamed without changes.
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,3 @@ | ||
module gui | ||
|
||
go 1.22.0 |
Empty file.
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,56 @@ | ||
package main | ||
|
||
import "C" | ||
|
||
// Framework stuff | ||
|
||
type stringC = *C.char | ||
|
||
func toString(value stringC) string { | ||
return C.GoString(value) | ||
} | ||
|
||
func toStringC(value string) stringC { | ||
return C.CString(value) | ||
} | ||
|
||
type Global struct { | ||
items map[uint64]*any | ||
index uint64 | ||
} | ||
|
||
var global = &Global{ | ||
items: make(map[uint64]*any), | ||
index: 1, | ||
} | ||
|
||
func ref(item any) uint64 { | ||
key := global.index | ||
global.index++ | ||
global.items[key] = &item | ||
return key | ||
} | ||
|
||
func unref[T any](key uint64) *T { | ||
item := global.items[key] | ||
result := (*item).(T) | ||
return &result | ||
} | ||
|
||
// ################################# | ||
// ################################# | ||
// ################################# | ||
// ################################# | ||
// ################################# | ||
// ======================[START]===> Utilities | ||
|
||
//export destroy | ||
func destroy(key uint64) { | ||
delete(global.items, key) | ||
} | ||
|
||
// Library stuff | ||
|
||
func main() { | ||
|
||
} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.