Input Argument Helper */ Decode lat/long from a zset member's score. * Returns C_OK on successful decoding, otherwise C_ERR is returned. */
| 112 | /* Decode lat/long from a zset member's score. |
| 113 | * Returns C_OK on successful decoding, otherwise C_ERR is returned. */ |
| 114 | int longLatFromMember(robj_roptr zobj, robj *member, double *xy) { |
| 115 | double score = 0; |
| 116 | |
| 117 | if (zsetScore(zobj, szFromObj(member), &score) == C_ERR) return C_ERR; |
| 118 | if (!decodeGeohash(score, xy)) return C_ERR; |
| 119 | return C_OK; |
| 120 | } |
| 121 | |
| 122 | /* Check that the unit argument matches one of the known units, and returns |
| 123 | * the conversion factor to meters (you need to divide meters by the conversion |
no test coverage detected