mirror of
https://gitee.com/Lyon1998/pikapython.git
synced 2025-01-29 17:22:56 +08:00
fix %r print
This commit is contained in:
parent
ffaa73eff7
commit
f85e44a3b3
@ -532,6 +532,8 @@ char* strsFormatArg(Args* out_buffs, char* fmt, Arg* arg) {
|
||||
if (type == ARG_TYPE_POINTER) {
|
||||
fmt = strsReplace(&buffs, fmt, sym, "%p");
|
||||
break;
|
||||
}else{
|
||||
fmt = strsReplace(&buffs, fmt, sym, "%s");
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -553,6 +555,12 @@ char* strsFormatArg(Args* out_buffs, char* fmt, Arg* arg) {
|
||||
if (ARG_TYPE_NONE == type) {
|
||||
res = strsFormat(&buffs, PIKA_SPRINTF_BUFF_SIZE, fmt, "None");
|
||||
goto __exit;
|
||||
}else{
|
||||
Arg* arg_str = arg_toStrArg(arg);
|
||||
if (NULL != arg_str){
|
||||
res = strsFormat(&buffs, PIKA_SPRINTF_BUFF_SIZE, fmt, arg_getStr(arg_str));
|
||||
arg_deinit(arg_str);
|
||||
}
|
||||
}
|
||||
__exit:
|
||||
if (NULL != res) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user