MCPcopy Create free account
hub / github.com/SeeFlowerX/stackplz / NewNumFormat

Function NewNumFormat

user/argtype/argtype_flags.go:239–248  ·  view source on GitHub ↗
(p IArgType, format_type uint32)

Source from the content-addressed store, hash-verified

237}
238
239func NewNumFormat(p IArgType, format_type uint32) IArgType {
240 new_name := fmt.Sprintf("%s_fmt_%d", p.GetName(), format_type)
241 new_p := RegisterNew(new_name, p.GetTypeIndex())
242 new_i, ok := (new_p).(IArgTypeNum)
243 if !ok {
244 panic("...")
245 }
246 new_i.SetFormatType(format_type)
247 return new_p
248}
249
250func init() {
251 RegisterFlagsConfig(INT_FCNTL_FLAGS, INT, FcntlFlagsConfig)

Callers 4

r_SIGSETFunction · 0.85
R_NUM_HEXFunction · 0.85
R_NUM_ARRAYFunction · 0.85
R_NUM_ARRAY_FMTFunction · 0.85

Calls 4

RegisterNewFunction · 0.85
GetNameMethod · 0.65
GetTypeIndexMethod · 0.65
SetFormatTypeMethod · 0.65

Tested by

no test coverage detected