Mercurial > urweb
annotate tests/pb.ur @ 2070:382911d72e63
Check realloc's return code to prevent segfault on out of memory condition (Part 3)
author | Sergey Mironov <grrwlf@gmail.com> |
---|---|
date | Tue, 02 Sep 2014 17:37:22 +0000 |
parents | 04d7d563a36f |
children |
rev | line source |
---|---|
adam@2050 | 1 fun api_1 (pb:postBody) (nm:string) : transaction page = |
adam@2050 | 2 return <xml>Processing the request</xml> |
adam@2050 | 3 |
adam@2050 | 4 fun api (pb:postBody) (v:int) (nm:string) : transaction page = |
adam@2050 | 5 case v of |
adam@2050 | 6 1 => api_1 pb nm |
adam@2050 | 7 | _ => error <xml>Version {[v]} is not supported</xml> |