2022-03-06 00:58:28 +01:00
|
|
|
Extension { #name : #LibC }
|
|
|
|
|
2022-08-09 03:14:23 +02:00
|
|
|
{ #category : #'*Diya' }
|
|
|
|
LibC class >> alloc: size [
|
|
|
|
^self uniqueInstance alloc: size
|
|
|
|
]
|
|
|
|
|
|
|
|
{ #category : #'*Diya' }
|
|
|
|
LibC >> alloc:size [
|
|
|
|
^self ffiCall: #(void *malloc(size_t size))
|
|
|
|
|
|
|
|
]
|
|
|
|
|
2022-03-06 00:58:28 +01:00
|
|
|
{ #category : #'*Diya' }
|
|
|
|
LibC >> memset:pointer value: value size: size [
|
|
|
|
^self ffiCall: #(void *memset(void *pointer, int value, size_t size))
|
|
|
|
|
|
|
|
]
|
|
|
|
|
|
|
|
{ #category : #'*Diya' }
|
|
|
|
LibC class >> memset:pointer value: value size: size [
|
|
|
|
^self uniqueInstance memset: pointer value: value size: size
|
|
|
|
]
|