14 lines
239 B
Python
14 lines
239 B
Python
import stdio
|
|
import t, c
|
|
|
|
|
|
def deref_test() -> int:
|
|
s: str = "hello"
|
|
sp: str = s
|
|
slen: int = 0
|
|
while c.Deref(sp) != 0:
|
|
slen = slen + 1
|
|
sp = sp + 1
|
|
stdio.printf("ptr: len(hello)=%d\n", slen)
|
|
return 0
|