Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cannot use _Ctype_long(size) (value of type _Ctype_long) as _Ctype_longlong value in argument to (_Cfunc_PyBytes_FromStringAndSize) #352

Open
Inotart opened this issue Apr 30, 2024 · 3 comments

Comments

@Inotart
Copy link
Contributor

Inotart commented Apr 30, 2024

Error log:

PS E:\codes\edotcs\客户端-0.1.x-2设> gopy build -output=edotcs edotcs/src/edotcs
go build -v edotcs/src/edotcs

--- Processing package: edotcs/src/edotcs ---
no LibDir -- copy from IncDir: C:/Python312/libs
no LibPy -- set to: python312
no LibDir -- copy from IncDir: C:/Python312/libs
no LibPy -- set to: python312

--- building package ---
gopy.exe build -output=edotcs edotcs/src/edotcs
goimports -w edotcs.go
no LibDir -- copy from IncDir: C:/Python312/libs
no LibPy -- set to: python312
go build -mod=mod -buildmode=c-shared -o edotcs_go.pyd .
cmd had error: exit status 1  output:
# edotcs/edotcs
.\edotcs.go:278:53: cannot use _Ctype_long(size) (value of type _Ctype_long) as _Ctype_longlong value in argument to (_Cfunc_PyBytes_FromStringAndSize)

2024/04/30 11:57:34 error dispatching command: exit status 1

edotcs/src/edotcs.go

// edotcs.go
package edotcs

// func New_client() *types.Client {
// 	client := &types.Client{}
// 	return client
// }

func Hello() string {
	return "Hello, edotcs!"
}

System: Windows 11
Python Version: 3.12.3
Golang Version: 1.21.6

@Inotart Inotart closed this as completed Apr 30, 2024
@rcoreilly
Copy link
Member

note: this doesn't work for 3.11 apparently. linking to PR #353

@rcoreilly
Copy link
Member

rcoreilly commented May 3, 2024

now that appveyor is working, it appears that this is a windows specific issue.

@rcoreilly rcoreilly reopened this May 3, 2024
@rcoreilly
Copy link
Member

@Inotart please check if this is fixed for you now?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants