export stashForeachCallback
(index C.size_t, message *C.char, id *C.git_oid, handle unsafe.Pointer)
| 247 | |
| 248 | //export stashForeachCallback |
| 249 | func stashForeachCallback(index C.size_t, message *C.char, id *C.git_oid, handle unsafe.Pointer) C.int { |
| 250 | payload := pointerHandles.Get(handle) |
| 251 | data, ok := payload.(*stashCallbackData) |
| 252 | if !ok { |
| 253 | panic("could not retrieve data for handle") |
| 254 | } |
| 255 | |
| 256 | err := data.callback(int(index), C.GoString(message), newOidFromC(id)) |
| 257 | if err != nil { |
| 258 | *data.errorTarget = err |
| 259 | return C.int(ErrorCodeUser) |
| 260 | } |
| 261 | return C.int(ErrorCodeOK) |
| 262 | } |
| 263 | |
| 264 | // Foreach loops over all the stashed states and calls the callback |
| 265 | // for each one. |
nothing calls this directly
no test coverage detected
searching dependent graphs…