| 130 | }; |
| 131 | |
| 132 | KeyValues *SourceModBase::ReadKeyValuesHandle(Handle_t hndl, HandleError *err, bool root) |
| 133 | { |
| 134 | HandleError herr; |
| 135 | HandleSecurity sec; |
| 136 | KeyValueStack *pStk; |
| 137 | |
| 138 | sec.pOwner = NULL; |
| 139 | sec.pIdentity = g_pCoreIdent; |
| 140 | |
| 141 | if ((herr=handlesys->ReadHandle(hndl, g_KeyValueType, &sec, (void **)&pStk)) |
| 142 | != HandleError_None) |
| 143 | { |
| 144 | if (err) |
| 145 | { |
| 146 | *err = herr; |
| 147 | } |
| 148 | return NULL; |
| 149 | } |
| 150 | |
| 151 | if (err) |
| 152 | { |
| 153 | *err = HandleError_None; |
| 154 | } |
| 155 | |
| 156 | return (root) ? pStk->pBase : pStk->pCurRoot.front(); |
| 157 | } |
| 158 | |
| 159 | static cell_t smn_KvSetString(IPluginContext *pCtx, const cell_t *params) |
| 160 | { |
no test coverage detected